package com.ls.design.principle;

public class JavaCourse implements ICourse{
    //开闭原则
    private Integer id;
    private String name;
    private Double price;

    public JavaCourse(Integer id, String name, Double price) {
        this.id = id;
        this.name = name;
        this.price = price;
    }

    @Override
    public Integer getId() {
        return this.id;
    }

    @Override
    public String getName() {
        return this.name;
    }

    @Override
    public Double getPrice() {
        return this.price;
    }

    //依赖倒置原则
    @Override
    public void study() {
        System.out.println("Tom在学习java课程");
    }




}
